<div class="main patrol-info">
  <div class="main-header">
    <div class="pa-icon-div pull-left fs-14">
      <i class="iconfont icon-shouye fs-14 icon-vertical-top"></i>
      <span class="fs-vertical-middle">巡查管理>
      <span class="fs-theme-color">巡查内容</span>
      </span>
    </div>
    <go-back></go-back>
  </div>
  <div class="detail-content"
    ng-show="!vm.patrolDetailInfo.recordStatus">
    <div class="container-header fs-16">
      <span>内容详情</span>
    </div>
    <div class="issue-detail-container">
      <div class="title">
        <div class="title-txt fs-theme-color">
          <span>内容说明</span>
        </div>
      </div>
      <div class="content">
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">内容编号：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkNo}}</span>
          </div>
          <div class="row-item">
            <span class="item-label">类型：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkOrgType == 3 ? '项目部自查' : vm.patrolDetailInfo.checkOrgType == 2 ? '监理检查' : vm.patrolDetailInfo.checkOrgType == 1 ? '指挥部检查' : '-'}}</span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">标段：</span>
            <span class="item-value">{{vm.patrolDetailInfo.tenderName}}</span>
          </div>
          <div class="row-item">
            <span class="item-label">施工队：</span>
            <span class="item-value">{{vm.patrolDetailInfo.departmentName}}</span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">检查项：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkItemName}}</span>
          </div>
          <div class="row-item"
            ng-hide="vm.patrolDetailInfo.checkResult == 1">
            <span class="item-label">整改期限：</span>
            <span class="item-value">{{vm.patrolDetailInfo.rectifyDate | date:"yyyy-MM-dd HH:mm"}}</span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">提交人：</span>
            <span class="item-value">{{vm.patrolDetailInfo.creatorName}}</span>
          </div>
          <div class="row-item red-txt">
            <span class="item-label">提交时间：</span>
            <span class="item-value">{{vm.patrolDetailInfo.createdTime | date:"yyyy-MM-dd HH:mm"}}</span>
          </div>
        </div>
        <div class="issue-pics">
          <div class="issue-pics">
            <div class="issue-pics-title item-label fs-14">现场描述：</div>
            <span class="fs-14">{{vm.patrolDetailInfo.siteDescription}}</span>
          </div>
          <div class="issue-pics-container">
            <img ng-repeat="img in vm.patrolDetailInfo.files"
              ng-src="{{vm.$getAvatarSrc(img)}}"
              ng-click="vm.$preview(img)">
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="detail-content"
    ng-show="vm.patrolDetailInfo.recordStatus">
    <div class="search-info">
      <div class="fs-16">
        <span>当前状态：</span><span class="status-color">{{vm.$getStatus(vm.patrolDetailInfo.recordStatus)}}</span>
        <div class="handle-record-title fr fs-14"
          ng-click="vm.$isShowHandle()">处理记录<span class="fs-14 iconfont down-icon" ng-class="{'icon-fa-angle-up': vm.isShowHandleBoolean, 'icon-xiala': !vm.isShowHandleBoolean}"></span></div>
          <div class="handle-record-title fr fs-14" style="margin-right: 15px;" ui-sref="printRectifyNotice({id: vm.patrolId})"><span class="fs-14 iconfont icon-margin icon-gongzuotai"></span>打印整改通知单</div>
          <div class="handle-record-title fr fs-14" style="margin-right: 15px;" ui-sref="printRectifyReply({id: vm.patrolId})"><span class="fs-14 iconfont icon-margin icon-gongzuotai"></span>打印整改回复单</div>
      </div>
      <div class="handle-record"
        ng-show="vm.isShowHandleBoolean">
        <table class="record-table pa-table">
          <thead></thead>
          <tbody>
            <tr ng-show="vm.$table.fetchTimes > 0 &amp;&amp; vm.$table.pagination.total == 0 &amp;&amp; !vm.$table.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
              <td colspan="4">
                <div>暂无数据</div>
              </td>
            </tr>
            <tr ng-show="vm.$table.isTableLoading" class="ng-scope ng-hide" aria-hidden="true">
              <td colspan="4">
                <div>数据加载中...</div>
              </td>
            </tr>
            <tr ng-repeat="item in vm.patrolProcessInfo">
              <td>{{item.createdTime | date:"yyyy-MM-dd HH:mm" || '-'}}</td>
              <td>{{item.submitterName || '-'}}</td>
              <td>{{item.typeName || '-'}}</td>
              <td>{{item.content || '-'}}</td>
            </tr>
          </tbody>
        </table>
        <div style="margin:20px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.$table.pagination.totalItems}}</span>条</div>
        <div class="patrol-detail-page" ng-hide="vm.isBeyond">
          <ul uib-pagination
            total-items="vm.$table.pagination.totalItems"
            items-per-page="vm.$table.pagination.ITEMS_PER_PAGE"
            ng-model="vm.$table.pagination.currentPage"
            ng-change="vm.$getPatrolProcess(vm.patrolId)"
            max-size="vm.$table.pagination.maxSize"
            next-text="下一页"
            previous-text="上一页"
            class="pagination-sm pull-right"
            boundary-link-numbers="true"
            rotate="true"
            force-ellipses="true"></ul>
        </div>
      </div>
    </div>
    <div class="issue-detail-container">
      <div class="title">
        <div class="title-txt">
          <span class="fs-theme-color">内容说明</span>
          <div class="row-item fr fs-14">
            <span class="item-label">提交人：</span>
            <span class="item-value">{{vm.patrolDetailInfo.creatorName}}&nbsp;&nbsp;{{vm.patrolDetailInfo.createdTime | date:"yyyy-MM-dd HH:mm"}}</span>
          </div>
        </div>
      </div>
      <div class="content">
        <div class="issue-pics-container">
          <img ng-repeat="img in vm.patrolDetailInfo.files"
            ng-src="{{vm.$getAvatarSrc(img)}}"
            ng-click="vm.$preview(img)">
        </div>
        <div class="row-dash fs0 issue-pics">
          <div class="issue-pics">
            <div class="issue-pics-title item-label fs-14">现场描述：</div>
            <span class="fs-14">{{vm.patrolDetailInfo.siteDescription}}</span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="fs-14">
            <span class="item-label">整改要求：</span>
            <span class="item-value">{{vm.patrolDetailInfo.rectifyRequire}}</span>
          </div>
        </div>
        <div class="row-dash fs0 show-more">
          <div class="row-item"
            ng-hide="vm.patrolDetailInfo.checkResult == 1">
            <span class="item-label">整改期限：</span>
            <span class="item-value">{{vm.patrolDetailInfo.rectifyDate | date:"yyyy-MM-dd  HH:mm"}}</span>
          </div>
          <div class="row-item">
            <span class="item-label">标段：</span>
            <span class="item-value">{{vm.patrolDetailInfo.tenderName}}</span>
          </div>
          <div class="is-show-more fs-14">
            <span class="fs-theme-color" ng-click="vm.isShowMore()">更多内容<span class="fs-14 iconfont down-icon" ng-class="{'icon-fa-angle-up': vm.isShowMoreInfo, 'icon-xiala': !vm.isShowMoreInfo}"></span></span>
          </div>
        </div>
        <div class="row-dash fs0"
          ng-show="vm.isShowMoreInfo">
          <div class="row-item">
            <span class="item-label">检查项：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkItemName}}</span>
          </div>
          <div class="row-item">
            <span class="item-label">施工队：</span>
            <span class="item-value">{{vm.patrolDetailInfo.departmentName}}</span>
          </div>
        </div>
        <div class="row-dash fs0"
          ng-show="vm.isShowMoreInfo">
          <div class="row-item">
            <span class="item-label">内容编号：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkNo}}</span>
          </div>
          <div class="row-item">
            <span class="item-label">类型：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkOrgType == 3 ? '项目部自查' : vm.patrolDetailInfo.checkOrgType == 2 ? '监理检查' : vm.patrolDetailInfo.checkOrgType == 1 ? '指挥部检查' : '-'}}</span>
          </div>
        </div>
      </div>
    </div>
    <div class="issue-detail-container"
      ng-hide="vm.patrolDetailInfo.checkRectifyBean == null">
      <div class="title">
        <div class="title-txt">
          <span class="fs-theme-color">整改情况</span>
          <div class="row-item fr fs-14">
            <span class="item-label">提交人：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkRectifyBean.rectifyUserName}}&nbsp;&nbsp;{{vm.patrolDetailInfo.checkRectifyBean.rectifyTime | date:"yyyy-MM-dd HH:mm"}}</span>
          </div>
        </div>
      </div>
      <div class="content">
        <div class="issue-pics">
          <div class="issue-pics">
            <div class="issue-pics-container">
              <img
                ng-repeat="img in vm.patrolDetailInfo.checkRectifyBean.rectifyFiles"
                ng-src="{{vm.$getAvatarSrc(img)}}"
                ng-click="vm.$preview(img)">
            </div>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="fs-14">
            <div class="issue-pics-title item-label fs-14">现场描述：</div>
            <span class="fs-14">{{vm.patrolDetailInfo.checkRectifyBean.rectifySituation}}</span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">原因分析：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkRectifyBean.reasonAnalysisNames}}</span>
          </div>
        </div>
      </div>
    </div>
    <div class="issue-detail-container"
      ng-show="vm.patrolDetailInfo.checkRectifyBean != null && vm.patrolDetailInfo.checkRectifyBean.auditUserId != null">
      <div class="title">
        <div class="title-txt">
          <span class="fs-theme-color">审核情况</span>
          <div class="row-item fr fs-14">
            <span class="item-label">审核人：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkRectifyBean.auditUserName}}<span ng-if="vm.patrolDetailInfo.checkRectifyBean.auditUserId === vm.patrolDetailInfo.checkRectifyBean.rectifyUserId">（系统）</span></span>&nbsp;&nbsp;{{vm.patrolDetailInfo.checkRectifyBean.auditTime | date:"yyyy-MM-dd HH:mm"}}
          </div>
        </div>
      </div>
      <div class="content">
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">审核结果：</span>
            <span class="item-value">
              {{vm.patrolDetailInfo.checkRectifyBean.auditResult == 1 ? '通过' :
              vm.patrolDetailInfo.checkRectifyBean.auditResult == 2 ? '不通过' : ''}}
            </span>
          </div>
        </div>
        <div class="row-dash fs0">
          <div class="row-item">
            <span class="item-label">审核意见：</span>
            <span class="item-value">{{vm.patrolDetailInfo.checkRectifyBean.auditOpinion}}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
